import Login from "../Views/Login/Login";
import Home from "../Views/Home/Home";
import Department from "../Views/Org/Department";
import Job from "../Views/Org/Job";
import User from "../Views/Org/User";
import RightConfig from "../Views/Right/RightConfig";
import RightControl from "../Views/Right/RightControl";
import { Navigate } from "react-router-dom";
import UserDetail from "../Views/Org/UserDetail";
import RightConfigDetail from "../Views/Right/RightConfigDetail";
import Question from "../Views/Exam/Question";
import TestPaper from "../Views/Exam/TestPaper";
import TestPaperAdd from "../Views/Exam/TestPaperAdd";
import ExamArrange from "../Views/Exam/ExamArrange";
import NotFound from "../Views/Error/NotFound";
import ForbiddenPage from "../Views/Error/ForbiddenPage";
import QuestionDetail from "../Views/Exam/QuestionDetail";
import TestPaperDetil from "../Views/Exam/TestPaperDetil";
import ExamArrangeDetail from "../Views/Exam/ExamArrangeDetail";
// 路由配置数组
const routerConfig = [
  { path: "/", title: "", element: <Navigate to="/home" replace /> },
  { path: "/home", title: "首页", element: <Home /> },
  { path: "/login", title: "登录", element: <Login /> },
  { path: "/org/department", title: "部门", element: <Department /> },
  { path: "/org/job", title: "职务", element: <Job /> },
  { path: "/org/user", title: "用户", element: <User /> },
  { path: "/org/user/detail", title: "用户详情", element: <UserDetail /> },
  { path: "/right/rightControl", title: "权限管理", element: <RightControl /> },
  { path: "/right/rightConfig", title: "权限配置", element: <RightConfig /> },
  {
    path: "/right/rightConfig/Detail",
    title: "权限配置详情",
    element: <RightConfigDetail />,
  },
  { path: "/exam/question", title: "题库", element: <Question /> },
  {
    path: "/exam/question/detail",
    title: "题目详情",
    element: <QuestionDetail />,
  },
  {
    path: "/exam/testPaper",
    title: "试卷",
    element: <TestPaper />,
  },
  {
    path: "/exam/testPaper/Add",
    title: "添加试卷",
    element: <TestPaperAdd />,
  },
  {
    path: "/exam/testPaper/Detail",
    title: "试卷详情",
    element: <TestPaperDetil />,
  },
  {
    path: "/exam/examArrange",
    title: "考试安排",
    element: <ExamArrange />,
  },
  {
    path: "/exam/examArrange/Detail",
    title: "考试安排详情",
    element: <ExamArrangeDetail />,
  },
  { path: "/error/notFound", title: "找不到该页面", element: <NotFound /> },
  { path: "/error/noRight", title: "无权访问", element: <ForbiddenPage /> },
  {
    path: "*",
    title: "404",
    element: <Navigate to="/error/notFound" replace />,
  },
];
export default routerConfig;
